@extends('admin.layouts.default')
@section('content')
    <form action="{{route('admin.module.update',$module)}}" method="post">
        @csrf @method('PUT')
        <div class="card">
            <div class="card-body">
                <ul class="nav nav-tabs nav-overflow header-tabs">
                    <li class="nav-item">
                        <a href="{{route('admin.module.index')}}" class="nav-link pb-3">
                            模块列表
                        </a>
                    </li>
                    <li class="nav-item">
                        <a href="#" class="nav-link pb-3 active">
                            编辑模块
                        </a>
                    </li>
                </ul>
            </div>
            <div class="card-body">
                <div class="form-group">
                    <label>模块</label>
                    <input type="text" readonly class="form-control" value="{{$module['module']}}">
                </div>
                <div class="form-group">
                    <label>模块名</label>
                    <input type="text" class="form-control" value="{{$module['name']}}">
                </div>
                <div class="form-group">
                    <label>自定义域名</label>
                    <input type="text" name="domain"  class="form-control"
                           value="{{old('domain',$module['domain']??'')}}">
                    <small id="helpId" class="text-muted">
                        模块必须存在<b>HomeController@index</b>方法,自定义域名才有效
                    </small>
                </div>

                    <div class="form-group">
                        <label for="">会员中心菜单设置</label>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input"
                                   {{active_class($module['center_menu_setting']==1,'checked')}}
                                   type="radio" name="center_menu_setting" id="center_menu_setting1" value="1">
                            <label class="form-check-label" for="center_menu_setting1">显示</label>
                        </div>
                        <div class="form-check form-check-inline">
                            <input class="form-check-input"
                                   {{active_class($module['center_menu_setting']==0,'checked')}}
                                    type="radio" name="center_menu_setting" id="center_menu_setting2" value="0">
                            <label for="center_menu_setting2" class="form-check-label">隐藏</label>
                        </div>
                    </div>
                <div class="card-footer text-muted">
                    <button class="btn btn-primary btn-sm">提交修改</button>
                </div>
            </div>
        </div>
    </form>
@endsection